package com.xr.security;

import org.marmot.framework.security.Account;

import com.bstek.dorado.common.DoradoContext;

public class CurrentAccountAccessor implements
		org.marmot.framework.security.CurrentAccountAccessor {

	public Account getCurrentAccount() {
		DoradoContext conext = DoradoContext.getContext();
		Account account = (Account) conext.getAttribute(DoradoContext.SESSION,
				Constants.LOGIN_USER_SESSION_KEY);
		return account;
	}

	public boolean isLoggedIn() {
		return (getCurrentAccount() != null);
	}
}
